Developer --> Technical Publications
PATHMac OS 8 Developer Documentation > Files > Navigation Services >

Programming With Navigation Services 1.1


Setting the Default Location

Navigation Services maintains default location information for dialog boxes. The default location is the folder or volume whose contents will be displayed in the browser list when a dialog box is first displayed. You can override the default location and selection of any Navigation Services dialog box by passing a pointer to an Apple event descriptor ( AEDesc ) structure for the new location in the defaultLocation parameter of the appropriate function. This AEDesc structure will normally be of type 'typeFSS' and describe a file, folder, or volume.

To select the default location instead of displaying it, supply the kNavSelectDefaultLocation constant in the dialogOptionFlags field of the structure of type NavDialogOptions you specify in the dialogOptions parameter of a Navigation Services function such as NavGetFile . For example, if you pass an AEDesc structure describing the System Folder in the defaultLocation parameter of the NavGetFile function, Navigation Services displays an Open dialog box with the System Folder as the default location. If you pass the same value to the NavGetFile function and supply the kNavSelectDefaultLocation constant in the dialogOptionFlags field of the NavDialogOptions structure, the Open dialog box shows the startup volume as the default location with the System Folder selected.

If you pass NULL for the AEDesc structure, or attempt to pass an invalid AEDesc structure, Navigation Services 1.1 displays the desktop as the default location.

IMPORTANT

If you pass NULL for the AEDesc structure describing a default location, or attempt to pass an invalid AEDesc structure, and specify the kNavSelectDefaultLocation constant as described above, Navigation Services 1.0 will crash.


© 1998 Apple Computer, Inc. – (Last Updated 23 Nov 98)

Previous | Back Up One Level | Next |